;;; ~/.doom.d/config/init-markdown-mode.el -*- lexical-binding: t; -*-

;; (global-pangu-spacing-mode 1)
;; ;; (setq pangu-spacing-real-insert-separtor t)
;; (after! (or eshell-mode prog-mode shell-mode term-mode yaml-mode)
;;   (pangu-spacing-mode -1))

(global-pangu-spacing-mode -1)
(add-hook! org-mode
  (pangu-spacing-mode 1))

(remove-hook 'org-mode-hook #'auto-fill-mode)

;; improve the performance of opening markdown file
(add-hook! (or LaTeX-mode markdown-mode org-mode)
  (auto-fill-mode -1)  ;; if column ==80 return
  ;; (visual-line-mode t)
  (set (make-local-variable 'pangu-spacing-real-insert-separtor) t)
  )

;; ;; improve the performance of opening org file
;; (add-hook! org-mode
;;   ;; (auto-fill-mode)  ;; if column ==80 return
;;   (toggle-truncate-lines)
;;   ;; (visual-line-mode t)
;;   (set (make-local-variable 'pangu-spacing-real-insert-separtor) t)
;;   )

(provide 'init-pangu-spacing)
